package com.lemon.exam.common.constant;

import org.springframework.http.MediaType;

import java.time.format.DateTimeFormatter;

/**
 * 系统常量类
 *
 * @author Lemon
 * @since 2025/3/20 12:10
 */
public final class ApiConst {
    public final static DateTimeFormatter DATE_FORMATTER_1 = DateTimeFormatter.ofPattern("yyyy-MM");
    public final static DateTimeFormatter DATE_FORMATTER_2 = DateTimeFormatter.ofPattern("yyyy年MM月");
    public final static DateTimeFormatter DATE_FORMATTER_3 = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
    public final static DateTimeFormatter DATE_FORMATTER_4 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
    public final static DateTimeFormatter DATE_FORMATTER_5 = DateTimeFormatter.ofPattern("yyyy-MM-dd");
    public final static DateTimeFormatter DATE_FORMATTER_6 = DateTimeFormatter.ofPattern("HH:mm:ss");
    public final static DateTimeFormatter DATE_FORMATTER_7 = DateTimeFormatter.ofPattern("HHmmss");
    public final static DateTimeFormatter DATE_FORMATTER_8 = DateTimeFormatter.ofPattern("yyyyMMdd");
    public final static DateTimeFormatter DATE_FORMATTER_9 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss:SSS");
    public final static DateTimeFormatter DATE_FORMATTER_10 = DateTimeFormatter.ofPattern("yyyy/MM/dd");
    public final static DateTimeFormatter DATE_FORMATTER_11 = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
    public final static DateTimeFormatter DATE_FORMATTER_12 = DateTimeFormatter.ofPattern("yyyyMMdd_HHmmssSSS");
    public final static DateTimeFormatter DATE_FORMATTER_13 = DateTimeFormatter.ofPattern("yyyy");

    public final static String INSERT_SUCCESS = "新增成功！";
    public final static String UPDATE_SUCCESS = "修改成功！";
    public final static String DELETE_SUCCESS = "删除成功！";
    public final static String ENABLE_SUCCESS = "启用成功！";
    public final static String UNABLE_SUCCESS = "停用成功！";

    public static final Long SUPER_PARENT_ID = -1L;

    public static final String SUPER_MENU_NAME = "顶级菜单";

    //ElasticSearch日志索引
    public static final String ES_LOGGING_INDEX = "logging";

    // Excel媒体类型
    public static final MediaType EXCEL_MEDIA_TYPE = MediaType.parseMediaType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");

    //空字符串数组
    public static final String[] EMPTY_STRING_ARRAY = new String[0];

    //定义角色的前缀
    public static final String ROLE_PREFIX = "ROLE_";

    //定义资源的前缀
    public static final String RESOURCE_PREFIX = "sys";

}
